import request from '@/utils/request'
import qs from 'qs'

export function login(data) {
  return request({
    url: 'login',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function logout(data) {
  return request({
    url: 'logout',
    method: 'post',
  })
}
export function getUsers(data) {
  return request({
    url: 'getUsersByPage',
    method: 'post',
    data
  })
}

export function getInfo(token,loginname) {
  return request({
    url: 'userinfo',
    method: 'get',
    params: { token,loginname }
  })
}